import java.util.Scanner;

public class J1503 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt()){
            int num3 = 0;
            int num1 = 1;
            int num2 = 1;
            int ordinal = in.nextInt();
            if(ordinal < 3){
                System.out.println(1);
            }else if(ordinal >= 3) {
                for (int i = 1; i <= ordinal - 2; i++) {
                    num3 = num1 + num2;
                    num1 = num2;
                    num2 = num3;
                }
                System.out.println(num3);
            }
        }
    }
}
